import random

from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.select import Select


op = webdriver.ChromeOptions()
op.add_experimental_option('excludeSwitches', ['enable-automation'])
op.add_experimental_option('useAutomationExtension', False)
driver = webdriver.Chrome(options=op)
driver.maximize_window()
driver.get("https://jqueryui.com/slider/#hotelrooms")
sleep(2)
driver.switch_to.frame(driver.find_element(By.CSS_SELECTOR,"#content > iframe"))
wait = WebDriverWait(driver,5,0.5)
xiala = wait.until(EC.presence_of_element_located((By.CSS_SELECTOR,"#minbeds")))
# xiala1 = driver.find_element(By.CSS_SELECTOR,'#minbeds')
HXX = [1,2,3,4,5,6]
Select(xiala).select_by_visible_text(str(random.choice(HXX)))
# sleep(3)





driver.quit()